//
//  DeliveryAddressCell.m
//  cityStar
//
//  Created by joyban on 14-12-29.
//  Copyright (c) 2014年 tiny. All rights reserved.
//

#import "DeliveryAddressCell.h"

@implementation DeliveryAddressCell

+(CGFloat)heightOfTableCell
{
    return 90;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setWithCellData:(DeliveryModel *)brand setcellrow:(float)row
{
    self.penBtn.tag = row;
    [brand.content enumerateObjectsUsingBlock:^(DeliverycontentModel *obj, NSUInteger idx, BOOL *stop) {
        NSLog(@"%lu",(unsigned long)idx);
        if(row == idx)
        {
            self.NameLabel.text = [NSString stringWithFormat:@"%@",obj.name];
            self.TelPhoenLabel.text = [NSString stringWithFormat:@"%@",obj.phone];
            self.contentLabel.text = [NSString stringWithFormat:@"%@",obj.address];
            NSString *defaul = [NSString stringWithFormat:@"%@",obj.is_default];
            if([defaul isEqualToString:@"1"])
            {
                self.selectImg.hidden = NO;
            }else{
                self.selectImg.hidden = YES;
            }
        }
    }];
}

- (IBAction)didbtn_Action:(UIButton *)sender {
    [self.delegate senderdidClick:sender];
}

@end
